ci: Enable -Werror for clang
authorColin Walters <walters@verbum.org>
Thu, 20 Jul 2017 19:34:15 +0000 (15:34 -0400)
committerAtomic Bot <atomic-devel@projectatomic.io>
Fri, 21 Jul 2017 20:45:47 +0000 (20:45 +0000)
I hit an unused-variable warning with `GLNX_AUTO_PREFIX_ERROR` for
rpm-ostree and led me to wonder why ostree didn't fail, then I noticed
we had lost the special `-Werror=unused-variable` bit.  Let's go
ahead and use `-Werror` for clang too.

Closes: #1023
Approved by: jlebon

.papr.yml
ci/build-check.sh

index 4ec0765c44dff0839a19df81af4ab5c828f59a81..ea378c9802d9f38bde7e27f613423046ae198b9f 100644 (file)
--- a/.papr.yml
+++ b/.papr.yml
@@ -31,6 +31,7 @@ timeout: 30m
 
 artifacts:
   - test-suite.log
+  - config.log
 ---
 
 context: c7-primary
index 0e12000f7a7622a77c99cc6fd58749d8015c04d1..7df1f42409820987b48298eda939d2a9d78a51ad 100755 (executable)
@@ -15,6 +15,9 @@ if test -x /usr/bin/gnome-desktop-testing-runner; then
 fi
 
 if test -x /usr/bin/clang; then
+    # always fail on warnings; https://github.com/ostreedev/ostree/pull/971
+    # Except for clang-4.0: error: argument unused during compilation: '-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1' [-Werror,-Wunused-command-line-argument]
+    export CFLAGS="-Wno-error=unused-command-line-argument -Werror ${CFLAGS:-}"
     git clean -dfx && git submodule foreach git clean -dfx
     # And now a clang build to find unused variables because it does a better
     # job than gcc for vars with cleanups; perhaps in the future these could